package com.github.pig.admin.model.park;

import java.math.BigDecimal;
import java.util.Date;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author sxf
 * @since 2018-12-22
 */
@TableName("employee_info")
@Data
public class EmployeeInfo extends Model<EmployeeInfo> {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.UUID)
    private String id;
    @TableField("dept_id")
    private Integer deptId;

    @Excel(name = "部门名称", orderNum = "4")
    @TableField("dept_name")
    private String deptName;
    @TableField("company_id")
    private Integer companyId;
    @TableField(exist = false)
    @Excel(name="公司名称",orderNum = "0")
    private String companyName;
    @TableField("role_id")
    private String roleId;
    @Excel(name="角色code",orderNum = "5")
    @TableField("role_name")
    private String roleName;
    @Excel(name = "姓名", orderNum = "0")
    private String name;
    @Excel(name = "手机号", orderNum = "2")
    private String phone;
    @TableField("id_card")
    @Excel(name = "身份证号", orderNum = "3")
    private String idCard;

    private Integer age;
    @Excel(name = "性别", replace = {"男_1", "女_2"}, orderNum = "1")
    private String sex;
    /**
     * 省
     */
    private Integer province;
    /**
     * 市
     */
    private Integer city;
    /**
     * 县
     */
    private Integer county;
    /**
     * 镇
     */
    private Integer town;
    /**
     * 民族
     */
    @Excel(name = "民族", orderNum = "6",replace = {"汉族_0", "少数民族_1","其他_2"})
    private String nation;
    /**
     * 现住址
     */
    private String address;
    /**
     * 婚姻状况
     */
    private String marriage;
    /**
     * 有无子女
     */
    private String children;
    /**
     * 居住情况
     */
    private String live;
    /**
     * 政治面貌
     */
    private String politics;
    /**
     * 入司时间
     */
    @TableField("enter_time")
    private Date enterTime;
    /**
     * 工号
     */
    @TableField("job_number")
    private String jobNumber;
    /**
     * 职位
     */
    @Excel(name = "职位", orderNum = "7" ,replace = {"汉族_0", "少数民族_1","其他_2"})
    private String position;
    /**
     * 学历
     */
    private String education;
    /**
     * 工作年限
     */
    private String working;
    /**
     * 职级工资
     */
    private BigDecimal wages;
    /**
     * 保险
     */
    private String insurance;
    /**
     * 合同起止日期
     */
    @TableField("contract_start")
    private Date contractStart;
    @TableField("contract_end")
    private Date contractEnd;
    /**
     * 紧急联系人
     */
    @TableField("emergency_name")
    private String emergencyName;
    @TableField("emergency_phone")
    private String emergencyPhone;
    @TableField("emergency_relation")
    private String emergencyRelation;
    @TableField("emergency_address")
    private String emergencyAddress;
    /**
     * 是否默认
     */
    @TableField("is_default")
    private String isDefault;
    /**
     * 是否离职 0未离职1已离职
     */
    @TableField("quit")
    private String quit;
    /**
     * 离职时间
     */
    @TableField("quit_time")
    private Date quitTime;

    /**
     * 采集有效期时间
     */
    @TableField("finger_time")
    private Date fingerTime;

    @TableField("create_time")
    private Date createTime;
    @TableField("update_time")
    private Date updateTime;
    @TableField("del_flag")
    private String delFlag;
    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "EmployeeInfo{" +
                ", id=" + id +
                ", deptId=" + deptId +
                ", deptName=" + deptName +
                ", roleId=" + roleId +
                ", roleName=" + roleName +
                ", name=" + name +
                ", phone=" + phone +
                ", idCard=" + idCard +
                ", province=" + province +
                ", city=" + city +
                ", county=" + county +
                ", town=" + town +
                ", nation=" + nation +
                ", address=" + address +
                ", marriage=" + marriage +
                ", children=" + children +
                ", live=" + live +
                ", politics=" + politics +
                ", enterTime=" + enterTime +
                ", jobNumber=" + jobNumber +
                ", position=" + position +
                ", education=" + education +
                ", working=" + working +
                ", wages=" + wages +
                ", insurance=" + insurance +
                ", contractStart=" + contractStart +
                ", contractEnd=" + contractEnd +
                ", emergencyName=" + emergencyName +
                ", emergencyPhone=" + emergencyPhone +
                ", emergencyRelation=" + emergencyRelation +
                ", emergencyAddress=" + emergencyAddress +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", delFlag=" + delFlag +
                "}";
    }
}
